<?php include 'header.php'; ?>


<!-- MAIN -->
<div id="main">	
    <div class="wrapper">

        <!-- caydeban-block -->
        <div class="home-block" >
            <h2 class="home-block-heading"><span>Cây đang nảy mầm </span></h2>
            <div class="one-third-thumbs clearfix" >
                <?php
                if (isset($list_tree)) {
                    $i = 1;
                    foreach ($list_tree as $tree) {
                        ?>
                        <div class="item <?php if ($i % 3 == 0) { ?>last<?php } ?>">
                            <?php if ($tree['Number'] <= 0) { ?>
                                <div class="chay_hang"></div>
                            <?php } ?>
                            <div class="top_figure">
                                <span class="name"><?php echo $tree["Name"]; ?></span>
                                <div class="ma_so"><p>MS: <span style="color:#C00D09; "><?php echo showMaSo($tree["MaSo"]); ?></span></p></div>
                                <!--<div class="entry-date"><div class="number">23</div></div>-->
                                <!--<hr />-->
                            </div>
                            <figure >
                                <figcaption>
                                    <strong><?php echo $tree["Name"]; ?></strong>
                                    <span><?php echo $tree['Description']; ?></span>
                                    <a href="<?php echo base_url();?>home/detail/<?php echo $tree["MaSo"] ?>" class="opener"></a>
                                </figcaption>

                                <a href="<?php echo base_url();?>home/detail/<?php echo $tree["MaSo"] ?>"  class="thumb"><img src="<?php echo base_url() . "htdocs/"; ?>img/tree/<?php echo $tree["MaSo"] ?>.jpg"  /></a>
                            </figure>
                            <div class="bottom_figure">
                                <a href="#"><img class="datmua" src="<?php echo base_url() . "htdocs/"; ?>img/button-mua.png" /></a>
                                <p class="gia">Giá: <span style="color:#C00D09; "><?php echo $tree['Price']; ?>K</span></p>
                            </div>
                        </div>
                        <?php
                        $i++;
                    }
                }
                ?>
            </div>
        </div>
        <!-- ENDS caydeben-block -->

    </div>
</div>
<!-- ENDS MAIN -->

<?php include 'footer.php'; ?>